interface P{
    name?:number;
    age?:string;
    sex?:number;
}
function getP(p:P):void{
    console.log(p);
}
getP({name:1})
getP({name:1,age:'18'})
getP({name:1,age:'18',sex:1})